package cn.fuzongyao.learning.android.crime08;

import java.time.LocalDate;
import java.util.UUID;

public class Crime {
    private UUID id;
    private String title;
    private LocalDate date;
    private boolean solved;

    public Crime() {
        id = UUID.randomUUID();
        date = LocalDate.now();
    }

    public UUID getId() {
        return id;
    }

    public String getTitle() {
        return title;
    }

    public Crime setTitle(String title) {
        this.title = title;
        return this;
    }

    public LocalDate getDate() {
        return date;
    }

    public Crime setDate(LocalDate date) {
        this.date = date;
        return this;
    }

    public boolean isSolved() {
        return solved;
    }

    public Crime setSolved(boolean solved) {
        this.solved = solved;
        return this;
    }

    @Override
    public String toString() {
        return "Crime{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", date=" + date +
                ", solved=" + solved +
                '}';
    }
}
